package cn.toprog.viewer;

import java.io.File;
import java.nio.file.Files;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;

public class Main extends Application {

    @Override
    public void start(Stage primaryStage) throws Exception {
        Parent root = FXMLLoader.load(getClass().getResource("sample.fxml"));
        primaryStage.setTitle("Hello World");
        Scene scene = new Scene(root, 1024, 768);
        primaryStage.setScene(scene);
        primaryStage.show();

//        File f = new File("C:\\");
//        File[] files = f.listFiles();
//        for(File sub : files) {
//            if(sub.isDirectory() && !sub.isHidden()) {
//                System.out.printf("%20s - %s - %s\n", sub.getName(), sub.canRead(), Files.isReadable(sub.toPath()));
//            }
//        }
    }


    public static void main(String[] args) {
        launch(args);
    }
}
